<template>
    <div>
        <div class="crumbs">
            <el-breadcrumb separator="/">
                <el-breadcrumb-item>
                    <!-- <div class="indexTitle">楼幢管理</div> -->
                    <div class="contentsize">经营查询</div>
                </el-breadcrumb-item>
            </el-breadcrumb>
        </div>
        <div class="container">
            <div class="handle-box">
                <!-- 办公自用 -->
                <el-form ref="form" :model="form" label-width="100px" :inline="true" size="mini" v-if="activeName == 'first'">
                    <el-form-item label="区属名称:">
                        <div style="width: 190px">
                            <el-select v-model="form.qs" placeholder="请选择区属名称" clearable @change="onSearch('form')">
                                <el-option v-for="item in qslist" :key="item.value" :label="item.label" :value="item.value"> </el-option>
                            </el-select>
                        </div>
                    </el-form-item>
                    <el-form-item label="房屋地址:">
                        <div style="width: 190px">
                            <el-input v-model="form.fwdz" placeholder="请输入房屋地址" @keyup.enter.native="onSearch('form')"></el-input>
                        </div>
                    </el-form-item>
                    <el-form-item label="档案编号:">
                        <div style="width: 190px">
                            <el-input v-model="form.dabh" placeholder="请输入档案编号" @keyup.enter.native="onSearch('form')"></el-input>
                        </div>
                    </el-form-item>
                    <el-form-item label="产权单位:">
                        <div style="width: 190px">
                            <!-- <el-input v-model="form.cqdw" placeholder="请输入产权单位"></el-input> -->
                            <el-select
                                v-model="form.cqdw"
                                placeholder="请选择产权单位"
                                style="width: 100%"
                                @change="onSearch('form')"
                                clearable
                            >
                                <el-option v-for="item in cqdwlist" :key="item.code" :label="item.name" :value="item.code"> </el-option>
                            </el-select>
                        </div>
                    </el-form-item>
                    <el-form-item label="建筑面积:">
                        <div style="width: 190px">
                            <el-col :span="11">
                                <el-input v-model="form.jzmja" @keyup.enter.native="onSearch('form')"></el-input>
                            </el-col>
                            <el-col class="line" :span="2"><span style="font-size: 12px">至</span></el-col>
                            <el-col :span="11">
                                <el-input v-model="form.jzmjb" @keyup.enter.native="onSearch('form')"></el-input>
                            </el-col>
                        </div>
                    </el-form-item>
                    <el-form-item label="风貌建筑:">
                        <div style="width: 190px">
                            <el-select
                                v-model="form.fmjz"
                                placeholder="请选择是否为风貌建筑"
                                clearable
                                @change="onSearch1('form', 'fmjz', form.fmjz)"
                            >
                                <el-option v-for="item in sflist" :key="item.code" :label="item.name" :value="item.code"> </el-option>
                            </el-select>
                        </div>
                    </el-form-item>
                    <el-form-item label="风貌保护等级:">
                        <div style="width: 190px">
                            <el-select
                                v-model="form.fmjzjb"
                                placeholder="请选择风貌保护等级"
                                clearable
                                @change="onSearch('form')"
                                :disabled="fmjzjbshow"
                            >
                                <el-option v-for="item in fmjzjblist" :key="item.code" :label="item.name" :value="item.code"> </el-option>
                            </el-select>
                        </div>
                    </el-form-item>
                    <el-form-item label="文物保护:">
                        <div style="width: 190px">
                            <el-select
                                v-model="form.wwbh"
                                placeholder="请选择是否为文物保护"
                                clearable
                                @change="onSearch1('form', 'wwbh', form.wwbh)"
                            >
                                <el-option v-for="item in sflist" :key="item.code" :label="item.name" :value="item.code"> </el-option>
                            </el-select>
                        </div>
                    </el-form-item>
                    <el-form-item label="文物保护级别:">
                        <div style="width: 190px">
                            <el-select
                                v-model="form.wwbhjb"
                                placeholder="请选择文物保护级别"
                                clearable
                                @change="onSearch('form')"
                                :disabled="wwbhjbshow"
                            >
                                <el-option v-for="item in wwbhjblist" :key="item.code" :label="item.name" :value="item.code"> </el-option>
                            </el-select>
                        </div>
                    </el-form-item>
                    <el-form-item>
                        <el-button type="primary" @click="onSearch('form')" icon="el-icon-search" class="searchcolor">查询</el-button>
                        <el-button @click="reSearch('form')" icon="el-icon-refresh" class="searchcolor">重置</el-button>
                        <el-button type="primary" @click="downloadlist('form')" icon="el-icon-download" class="searchcolor">导出</el-button>
                    </el-form-item>
                </el-form>
                <!-- 委托运营 -->
                <el-form ref="wtjyform" :model="wtjyform" label-width="100px" :inline="true" size="mini" v-if="activeName == 'second'">
                    <el-form-item label="房屋地址:">
                        <div style="width: 190px">
                            <el-input
                                v-model="wtjyform.fwdz"
                                placeholder="请输入房屋地址"
                                @keyup.enter.native="onSearch('wtjyform')"
                            ></el-input>
                        </div>
                    </el-form-item>
                    <el-form-item label="档案编号:">
                        <div style="width: 190px">
                            <el-input
                                v-model="wtjyform.dabh"
                                placeholder="请输入档案编号"
                                @keyup.enter.native="onSearch('wtjyform')"
                            ></el-input>
                        </div>
                    </el-form-item>
                    <el-form-item label="产权单位:">
                        <div style="width: 190px">
                            <el-input
                                v-model="wtjyform.cqdw"
                                placeholder="请输入产权单位"
                                @keyup.enter.native="onSearch('wtjyform')"
                            ></el-input>
                        </div>
                    </el-form-item>
                    <el-form-item label="房屋性质:" style="width: 24%" prop="fwyt">
                        <div style="width: 190px">
                            <el-select
                                v-model="wtjyform.fwyt"
                                placeholder="请选择房屋性质"
                                clearable
                                style="width: 100%"
                                @change="onSearch('wtjyform')"
                            >
                                <el-option v-for="item in fwytlist" :key="item.code" :label="item.name" :value="item.code"> </el-option>
                            </el-select>
                        </div>

                        <!-- <el-input v-model="fjform.fwyt" placeholder="请输入房屋性质" class="search-input"></el-input> -->
                    </el-form-item>
                    <el-form-item label="风貌建筑:">
                        <div style="width: 190px">
                            <el-select
                                v-model="wtjyform.fmjz"
                                placeholder="请选择是否为风貌建筑"
                                clearable
                                @change="onSearch1('wtjyform', 'fmjz', wtjyform.fmjz)"
                            >
                                <el-option v-for="item in sflist" :key="item.code" :label="item.name" :value="item.code"> </el-option>
                            </el-select>
                        </div>
                    </el-form-item>
                    <el-form-item label="风貌保护等级:">
                        <div style="width: 190px">
                            <el-select
                                v-model="wtjyform.fmjzjb"
                                placeholder="请选择风貌保护等级"
                                clearable
                                @change="onSearch('wtjyform')"
                                :disabled="fmjzjbshow1"
                            >
                                <el-option v-for="item in fmjzjblist" :key="item.code" :label="item.name" :value="item.code"> </el-option>
                            </el-select>
                        </div>
                    </el-form-item>
                    <el-form-item label="文物保护:">
                        <div style="width: 190px">
                            <el-select
                                v-model="wtjyform.wwbh"
                                placeholder="请选择是否为文物保护"
                                clearable
                                @change="onSearch1('wtjyform', 'wwbh', wtjyform.wwbh)"
                            >
                                <el-option v-for="item in sflist" :key="item.code" :label="item.name" :value="item.code"> </el-option>
                            </el-select>
                        </div>
                    </el-form-item>
                    <el-form-item label="文物保护级别:">
                        <div style="width: 190px">
                            <el-select
                                v-model="wtjyform.wwbhjb"
                                placeholder="请选择文物保护级别"
                                clearable
                                @change="onSearch('wtjyform')"
                                :disabled="wwbhjbshow1"
                            >
                                <el-option v-for="item in wwbhjblist" :key="item.code" :label="item.name" :value="item.code"> </el-option>
                            </el-select>
                        </div>
                    </el-form-item>
                    <!-- <el-form-item label="承租人:">
                        <div style="width:190px">
                            <el-input v-model="wtjyform.czr" placeholder="请输入承租人"
                                @keyup.enter.native="onSearch('wtjyform')"></el-input>
                        </div>
                    </el-form-item> -->
                    <el-form-item label="产别:">
                        <div style="width: 190px">
                            <el-select v-model="wtjyform.cb" placeholder="请选择产别" clearable @change="onSearch('wtjyform')">
                                <el-option v-for="item in cblist" :key="item.code" :label="item.name" :value="item.code"> </el-option>
                            </el-select>
                        </div>
                    </el-form-item>
                    <el-form-item label="受托单位:">
                        <div style="width: 190px">
                            <el-select
                                v-model="wtjyform.stdwmc"
                                placeholder="请选择受托单位"
                                clearable
                                @change="onSearch('wtjyform')"
                                filterable
                            >
                                <el-option v-for="(item, stindex) in stdwlist" :key="stindex" :label="item.dwmc" :value="item.dwmc">
                                </el-option>
                            </el-select>
                        </div>
                    </el-form-item>
                    <!-- <el-form-item label="建筑面积:">
                        <div style="width:190px">
                            <el-input v-model="wtjyform.jzmj" placeholder="请输入建筑面积" @keyup.enter.native="onSearch('wtjyform')"></el-input>
                        </div>
                    </el-form-item> -->
                    <el-form-item label="状态:">
                        <div style="width: 190px">
                            <el-select v-model="wtjyform.jyzt" placeholder="请选择状态" clearable @change="onSearch('wtjyform')">
                                <el-option v-for="item in ztlist" :key="item.code" :label="item.name" :value="item.code"> </el-option>
                            </el-select>
                        </div>
                    </el-form-item>
                    <el-form-item>
                        <el-button type="primary" @click="onSearch('wtjyform')" icon="el-icon-search" class="searchcolor">查询</el-button>
                        <el-button @click="reSearch('wtjyform')" icon="el-icon-refresh" class="searchcolor">重置</el-button>
                        <el-button type="primary" @click="downloadlist('wtjyform')" icon="el-icon-download" class="searchcolor"
                            >导出</el-button
                        >
                    </el-form-item>
                </el-form>
                <!-- 出租经营 -->
                <el-form ref="czjyform" :model="czjyform" label-width="100px" :inline="true" size="mini" v-if="activeName == 'third'">
                    <el-form-item label="区属名称:">
                        <div style="width: 190px">
                            <el-select v-model="czjyform.qs" placeholder="请选择区属名称" clearable @change="onSearch('czjyform')">
                                <el-option v-for="item in qslist" :key="item.value" :label="item.label" :value="item.value"> </el-option>
                            </el-select>
                        </div>
                    </el-form-item>
                    <el-form-item label="房屋地址:">
                        <div style="width: 190px">
                            <el-input
                                v-model="czjyform.fwdz"
                                placeholder="请输入房屋地址"
                                @keyup.enter.native="onSearch('czjyform')"
                            ></el-input>
                        </div>
                    </el-form-item>
                    <el-form-item label="档案编号:">
                        <div style="width: 190px">
                            <el-input
                                v-model="czjyform.dabh"
                                placeholder="请输入档案编号"
                                @keyup.enter.native="onSearch('czjyform')"
                            ></el-input>
                        </div>
                    </el-form-item>
                    <el-form-item label="产权单位:">
                        <div style="width: 190px">
                            <el-input
                                v-model="czjyform.cqdw"
                                placeholder="请输入产权单位"
                                @keyup.enter.native="onSearch('czjyform')"
                            ></el-input>
                        </div>
                    </el-form-item>
                    <!-- <el-form-item label="承租人:">
                        <div style="width:190px">
                            <el-input v-model="czjyform.czr" placeholder="请输入承租人"
                                @keyup.enter.native="onSearch('czjyform')"></el-input>
                        </div>
                    </el-form-item> -->
                    <el-form-item label="产别:">
                        <div style="width: 190px">
                            <el-select v-model="czjyform.cb" placeholder="请选择产别" clearable @change="onSearch('czjyform')">
                                <el-option v-for="item in cblist" :key="item.code" :label="item.name" :value="item.code"> </el-option>
                            </el-select>
                        </div>
                    </el-form-item>
                    <el-form-item label="建筑面积:">
                        <div style="width: 190px">
                            <el-col :span="11">
                                <el-input v-model="czjyform.jzmja" @keyup.enter.native="onSearch('czjyform')"></el-input>
                            </el-col>
                            <el-col class="line" :span="2"><span style="font-size: 12px">至</span></el-col>
                            <el-col :span="11">
                                <el-input v-model="czjyform.jzmjb" @keyup.enter.native="onSearch('czjyform')"></el-input>
                            </el-col>
                        </div>
                    </el-form-item>
                    <el-form-item label="风貌建筑:">
                        <div style="width: 190px">
                            <el-select
                                v-model="czjyform.fmjz"
                                placeholder="请选择是否为风貌建筑"
                                clearable
                                @change="onSearch1('czjyform', 'fmjz', czjyform.fmjz)"
                            >
                                <el-option v-for="item in sflist" :key="item.code" :label="item.name" :value="item.code"> </el-option>
                            </el-select>
                        </div>
                    </el-form-item>
                    <el-form-item label="风貌保护等级:">
                        <div style="width: 190px">
                            <el-select
                                v-model="czjyform.fmjzjb"
                                placeholder="请选择风貌保护等级"
                                clearable
                                @change="onSearch('czjyform')"
                                :disabled="fmjzjbshow2"
                            >
                                <el-option v-for="item in fmjzjblist" :key="item.code" :label="item.name" :value="item.code"> </el-option>
                            </el-select>
                        </div>
                    </el-form-item>
                    <el-form-item label="文物保护:">
                        <div style="width: 190px">
                            <el-select
                                v-model="czjyform.wwbh"
                                placeholder="请选择是否为文物保护"
                                clearable
                                @change="onSearch1('czjyform', 'wwbh', czjyform.wwbh)"
                            >
                                <el-option v-for="item in sflist" :key="item.code" :label="item.name" :value="item.code"> </el-option>
                            </el-select>
                        </div>
                    </el-form-item>
                    <el-form-item label="文物保护级别:">
                        <div style="width: 190px">
                            <el-select
                                v-model="czjyform.wwbhjb"
                                placeholder="请选择文物保护级别"
                                clearable
                                @change="onSearch('czjyform')"
                                :disabled="wwbhjbshow2"
                            >
                                <el-option v-for="item in wwbhjblist" :key="item.code" :label="item.name" :value="item.code"> </el-option>
                            </el-select>
                        </div>
                    </el-form-item>
                    <el-form-item label="房管员:">
                        <div style="width: 190px">
                            <el-select
                                v-model="czjyform.fgy"
                                placeholder="请选择房管员"
                                clearable
                                @change="onSearch('czjyform')"
                                :disabled="getfgyShow"
                            >
                                <el-option v-for="item in fgylist" :key="item.id" :label="item.name" :value="item.id"> </el-option>
                            </el-select>
                        </div>
                    </el-form-item>
                    <el-form-item label="状态:">
                        <div style="width: 190px">
                            <el-select v-model="czjyform.jyzt" placeholder="请选择状态" clearable @change="onSearch('czjyform')">
                                <el-option v-for="item in ztlist" :key="item.code" :label="item.name" :value="item.code"> </el-option>
                            </el-select>
                        </div>
                    </el-form-item>
                    <el-form-item>
                        <el-button type="primary" @click="onSearch('czjyform')" icon="el-icon-search" class="searchcolor">查询</el-button>
                        <el-button @click="reSearch('czjyform')" icon="el-icon-refresh" class="searchcolor">重置</el-button>
                        <el-button type="primary" @click="downloadlist('czjyform')" icon="el-icon-download" class="searchcolor"
                            >导出</el-button
                        >
                    </el-form-item>
                </el-form>
                <!-- 保障性租赁住房 -->
                <el-form ref="bzxzlzfform" :model="bzxzlzfform" label-width="120px" :inline="true" size="mini" v-if="activeName == 'forth'">
                    <el-form-item label="区属名称:">
                        <div style="width: 170px">
                            <el-select v-model="bzxzlzfform.qs" placeholder="请选择区属名称" clearable @change="onSearch('bzxzlzfform')">
                                <el-option v-for="item in qslist" :key="item.value" :label="item.label" :value="item.value"> </el-option>
                            </el-select>
                        </div>
                    </el-form-item>
                    <el-form-item label="产别类型:">
                        <div style="width: 170px">
                            <el-select v-model="bzxzlzfform.cb" placeholder="请选择产别类型" clearable @change="onSearch('bzxzlzfform')">
                                <el-option v-for="item in cblist" :key="item.code" :label="item.name" :value="item.code"> </el-option>
                            </el-select>
                        </div>
                    </el-form-item>
                    <el-form-item label="权证类型:">
                        <div style="width: 170px">
                            <el-input
                                v-model="bzxzlzfform.qzlx"
                                placeholder="请输入权证类型"
                                @keyup.enter.native="onSearch('bzxzlzfform')"
                            ></el-input>
                        </div>
                    </el-form-item>
                    <el-form-item label="档案编号:">
                        <div style="width: 170px">
                            <el-input
                                v-model="bzxzlzfform.dabh"
                                placeholder="请输入档案编号"
                                @keyup.enter.native="onSearch('bzxzlzfform')"
                            ></el-input>
                        </div>
                    </el-form-item>
                    <el-form-item label="土地使用权类型:">
                        <div style="width: 170px">
                            <el-input
                                v-model="bzxzlzfform.tdsyqlx"
                                placeholder="请输入土地使用权类型"
                                @keyup.enter.native="onSearch('bzxzlzfform')"
                            ></el-input>
                        </div>
                    </el-form-item>
                    <el-form-item label="建筑面积:">
                        <div style="width: 170px">
                            <el-col :span="11">
                                <el-input v-model="bzxzlzfform.jzmja" @keyup.enter.native="onSearch('bzxzlzfform')"></el-input>
                            </el-col>
                            <el-col class="line" :span="2"><span style="font-size: 12px">至</span></el-col>
                            <el-col :span="11">
                                <el-input v-model="bzxzlzfform.jzmjb" @keyup.enter.native="onSearch('bzxzlzfform')"></el-input>
                            </el-col>
                        </div>
                    </el-form-item>
                    <el-form-item label="风貌建筑:">
                        <div style="width: 170px">
                            <el-select
                                v-model="bzxzlzfform.fmjz"
                                placeholder="请选择是否为风貌建筑"
                                clearable
                                @change="onSearch1('bzxzlzfform', 'fmjz', bzxzlzfform.fmjz)"
                            >
                                <el-option v-for="item in sflist" :key="item.code" :label="item.name" :value="item.code"> </el-option>
                            </el-select>
                        </div>
                    </el-form-item>
                    <el-form-item label="风貌保护等级:">
                        <div style="width: 170px">
                            <el-select
                                v-model="form.fmjzjb"
                                placeholder="请选择风貌建筑保护等级"
                                clearable
                                @change="onSearch('bzxzlzfform')"
                                :disabled="fmjzjbshow3"
                            >
                                <el-option v-for="item in fmjzjblist" :key="item.code" :label="item.name" :value="item.code"> </el-option>
                            </el-select>
                        </div>
                    </el-form-item>
                    <el-form-item label="文物保护:">
                        <div style="width: 170px">
                            <el-select
                                v-model="bzxzlzfform.wwbh"
                                placeholder="请选择是否为文物保护"
                                clearable
                                @change="onSearch1('bzxzlzfform', 'wwbh', bzxzlzfform.wwbh)"
                            >
                                <el-option v-for="item in sflist" :key="item.code" :label="item.name" :value="item.code"> </el-option>
                            </el-select>
                        </div>
                    </el-form-item>
                    <el-form-item label="文物保护级别:">
                        <div style="width: 170px">
                            <el-select
                                v-model="bzxzlzfform.wwbhjb"
                                placeholder="请选择文物保护级别"
                                clearable
                                @change="onSearch('bzxzlzfform')"
                                :disabled="wwbhjbshow3"
                            >
                                <el-option v-for="item in wwbhjblist" :key="item.code" :label="item.name" :value="item.code"> </el-option>
                            </el-select>
                        </div>
                    </el-form-item>
                    <el-form-item label="小洋楼招商:">
                        <div style="width: 170px">
                            <el-select
                                v-model="bzxzlzfform.zsxyl"
                                placeholder="请选择是否为小洋楼招商"
                                clearable
                                @change="onSearch('bzxzlzfform')"
                            >
                                <el-option v-for="item in sflist" :key="item.code" :label="item.name" :value="item.code"> </el-option>
                            </el-select>
                        </div>
                    </el-form-item>
                    <el-form-item label="房屋地址:">
                        <div style="width: 170px">
                            <el-input
                                v-model="bzxzlzfform.fwdz"
                                placeholder="请输入房屋地址"
                                @keyup.enter.native="onSearch('bzxzlzfform')"
                            ></el-input>
                        </div>
                    </el-form-item>
                    <el-form-item label="房产状态:">
                        <div style="width: 170px">
                            <el-select v-model="bzxzlzfform.fczt" placeholder="请选择房产状态" clearable @change="onSearch('bzxzlzfform')">
                                <el-option v-for="item in fcztlist" :key="item.code" :label="item.name" :value="item.code"> </el-option>
                            </el-select>
                        </div>
                    </el-form-item>
                    <el-form-item label="房屋性质:">
                        <div style="width: 170px">
                            <el-select v-model="bzxzlzfform.fwyt" placeholder="请选择房屋性质" clearable @change="onSearch('bzxzlzfform')">
                                <el-option v-for="item in fwytlist" :key="item.code" :label="item.name" :value="item.code"> </el-option>
                            </el-select>
                        </div>
                    </el-form-item>
                    <el-form-item>
                        <el-button type="primary" @click="onSearch('bzxzlzfform')" icon="el-icon-search" class="searchcolor"
                            >查询</el-button
                        >
                        <el-button @click="reSearch('bzxzlzfform')" class="searchcolor" icon="el-icon-refresh">重置</el-button>
                        <el-button type="primary" @click="downloadlist('bzxzlzfform')" icon="el-icon-download" class="searchcolor"
                            >导出</el-button
                        >
                    </el-form-item>
                </el-form>
            </div>
            <el-tabs v-model="activeName" type="card">
                <el-tab-pane label="办公自用" name="first">
                    <el-table
                        :data="tableData"
                        style="width: 100%"
                        :header-cell-style="tableHeaderColor"
                        :row-style="tablerowColor"
                        :row-class-name="tableRowClassName"
                        :cell-style="tablecellColor"
                        border
                        :max-height="maxHeight"
                        show-summary
                        sum-text="合计"
                        :summary-method="getSummariesbgzy"
                    >
                        <el-table-column prop="dabh" label="档案编号" width="240" :show-overflow-tooltip="true" align="center">
                        </el-table-column>
                        <el-table-column prop="qs" label="区属" align="center" width="80"> </el-table-column>
                        <el-table-column prop="fwdz" label="房屋地址" align="center" width="280" :show-overflow-tooltip="true">
                            <template slot-scope="scope">
                                <span style="font-weight: 700; color: #409ee1; text-align: center">
                                    {{ scope.row.fwdz }}
                                </span>
                            </template>
                        </el-table-column>
                        <el-table-column prop="cqdw" label="产权单位" align="center"> </el-table-column>
                        <el-table-column prop="cb" label="产别" align="center" width="100"> </el-table-column>
                        <el-table-column prop="jzmj" label="建筑面积" align="center"> </el-table-column>
                        <el-table-column prop="glfs" label="经营方式" align="center">
                            <template slot-scope="scope">
                                <span style="font-weight: 700; color: #19be6b">
                                    {{ scope.row.glfs }}
                                </span>
                            </template>
                        </el-table-column>
                        <!-- <el-table-column label="操作" width="160" align="center">
                            <template slot-scope="scope">
                                <router-link
                                    :to="{ name: 'wtjydetail', params: { id: scope.row.id, jyglid: scope.row.jyglid, type: '2' } }"
                                    style="padding-right: 12px">
                                    <el-button type="text" size="small"
                                        v-if="scope.row.jyglid ? true : false">详情</el-button>
                                </router-link>
                            </template>
                        </el-table-column> -->
                    </el-table>
                    <div class="pagination" style="float: right">
                        <el-pagination
                            background
                            layout="total,prev, pager, next,jumper"
                            :total="total"
                            :current-page.sync="current"
                            :page-size="pageSize"
                            @current-change="(val) => handleCurrentChange('form', val)"
                        >
                        </el-pagination>
                    </div>
                </el-tab-pane>
                <el-tab-pane label="委托运营" name="second">
                    <el-table
                        :data="wtjytableData"
                        style="width: 100%"
                        :header-cell-style="tableHeaderColor"
                        :row-style="tablerowColor"
                        :row-class-name="tableRowClassName"
                        :cell-style="tablecellColor"
                        border
                        :max-height="maxHeight"
                        show-summary
                        sum-text="合计"
                        :summary-method="getSummaries"
                    >
                        <el-table-column prop="dabh" label="档案编号" align="center" width="240" :show-overflow-tooltip="true">
                        </el-table-column>
                        <el-table-column prop="qs" label="区属" align="center" width="80"> </el-table-column>
                        <el-table-column prop="fwdz" label="房屋地址" align="center" width="280" :show-overflow-tooltip="true">
                            <template slot-scope="scope">
                                <span style="font-weight: 700; color: #409ee1">
                                    {{ scope.row.fwdz }}
                                </span>
                            </template>
                        </el-table-column>
                        <el-table-column prop="cqdw" label="产权单位" align="center"> </el-table-column>
                        <el-table-column prop="cb" label="产别" align="center" width="100"> </el-table-column>
                        <el-table-column prop="jzmj" label="建筑面积" align="center" width="100"> </el-table-column>
                        <el-table-column prop="fwyt" label="房屋性质" align="center" width="100"> </el-table-column>
                        <el-table-column prop="jyzt" label="状态" align="center" width="80">
                            <template slot-scope="scope">
                                <span :style="scope.row.jyzt == 1 ? 'color:#19BE6B;' : ''">
                                    {{ scope.row.jyzt == 1 ? '出租' : '招租中' }}
                                </span>
                            </template>
                        </el-table-column>
                        <el-table-column label="操作" width="80" align="center">
                            <template slot-scope="scope">
                                <router-link :to="{ name: 'wtyydetail', params: { id: scope.row.id } }">
                                    <el-button type="text" size="small">详情</el-button>
                                </router-link>
                            </template>
                        </el-table-column>
                    </el-table>
                    <div class="pagination" style="float: right">
                        <el-pagination
                            background
                            layout="total,prev, pager, next,jumper"
                            :total="wtjytotal"
                            :current-page.sync="wtjycurrent"
                            :page-size="pageSize"
                            @current-change="(val) => handleCurrentChange('wtjyform', val)"
                        >
                        </el-pagination>
                    </div>
                </el-tab-pane>
                <el-tab-pane label="出租经营" name="third">
                    <el-table
                        :data="czjytableData"
                        style="width: 100%"
                        :header-cell-style="tableHeaderColor"
                        :row-style="tablerowColor"
                        :row-class-name="tableRowClassName"
                        :cell-style="tablecellColor"
                        border
                        :max-height="maxHeight"
                        show-summary
                        sum-text="合计"
                        :summary-method="getSummariesczjy"
                    >
                        <el-table-column prop="dabh" label="档案编号" align="center" width="240" :show-overflow-tooltip="true">
                        </el-table-column>
                        <el-table-column prop="qs" label="区属" align="center" width="80"></el-table-column>
                        <el-table-column prop="fwdz" label="房屋地址" align="center" width="280" :show-overflow-tooltip="true">
                            <template slot-scope="scope">
                                <span style="font-weight: 700; color: #409ee1">
                                    {{ scope.row.fwdz }}
                                </span>
                            </template>
                        </el-table-column>
                        <el-table-column prop="cqdw" label="产权单位" align="center"> </el-table-column>
                        <el-table-column prop="cb" label="产别" align="center" width="100"> </el-table-column>

                        <!-- <el-table-column prop="zjdj" label="租金单价" align="center"> </el-table-column> -->
                        <!-- <el-table-column prop="htje" label="合同金额" align="center"> </el-table-column> -->
                        <el-table-column prop="jzmj" label="建筑面积" align="center"> </el-table-column>
                        <!-- <el-table-column prop="zldqsj" label="租赁到期时间" align="center" width="120">
                            <template slot-scope="scope">
                                {{ scope.row.zldqsj ? scope.row.zldqsj.split(' ')[0] : '' }}
                            </template>
                        </el-table-column> -->
                        <el-table-column prop="jyzt" label="状态" align="center" width="80">
                            <template slot-scope="scope">
                                <span :style="scope.row.jyzt == 1 ? 'color:#19BE6B;' : ''">
                                    {{ scope.row.jyzt == 1 ? '出租' : '招租中' }}
                                </span>
                            </template>
                        </el-table-column>
                        <el-table-column label="操作" width="160" align="center">
                            <template slot-scope="scope">
                                <!-- v-if="scope.row.jyzt == 1" -->
                                <router-link :to="{ name: 'htdetail', params: { id: scope.row.id, signid: scope.row.signid } }">
                                    <el-button type="text" size="small">详情</el-button>
                                </router-link>
                                <el-button
                                    type="text"
                                    size="small"
                                    @click="gotosjymedit(scope.row.type, scope.row.id, scope.row.fgy, scope.row.fwdz, scope.row.dabh)"
                                    style="margin-left: 10px"
                                    v-if="role == '11111'"
                                    >新增</el-button
                                >
                                <!-- <router-link :to="{ name: 'addht', params: { id: scope.row.id } }" style="padding:0 12px"
                                    v-if="!scope.row.signid">
                                    <el-button type="text" size="small">新订合同</el-button>
                                </router-link> -->
                            </template>
                        </el-table-column>
                    </el-table>
                    <div class="pagination" style="float: right">
                        <el-pagination
                            background
                            layout="total,prev, pager, next,jumper"
                            :total="czjytotal"
                            :current-page.sync="czjycurrent"
                            :page-size="pageSize"
                            @current-change="(val) => handleCurrentChange('czjyform', val)"
                        >
                        </el-pagination>
                    </div>
                </el-tab-pane>
                <el-tab-pane label="保障性租赁住房" name="forth">
                    <el-table
                        :data="bzxzlzftableData"
                        style="width: 100%"
                        :header-cell-style="tableHeaderColor"
                        :row-style="tablerowColor"
                        :row-class-name="tableRowClassName"
                        :cell-style="tablecellColor"
                        border
                        :max-height="maxHeight"
                        show-summary
                        sum-text="合计"
                        :summary-method="getSummaries"
                    >
                        <el-table-column prop="dabh" label="档案编号" align="center"> </el-table-column>
                        <el-table-column prop="qs" label="区属" align="center" width="100"> </el-table-column>
                        <el-table-column prop="fwdz" label="房屋地址" align="center" :show-overflow-tooltip="true"> </el-table-column>
                        <el-table-column prop="lh" label="楼号" align="center" width="60"> </el-table-column>
                        <el-table-column prop="fwyt" label="房屋性质" align="center" width="100"> </el-table-column>
                        <el-table-column prop="cb" label="产别" align="center" width="100"> </el-table-column>
                        <el-table-column prop="zlc" label="总层数" align="center" width="80"> </el-table-column>
                        <el-table-column prop="jzmj" label="建筑面积" align="center" width="100"> </el-table-column>
                        <el-table-column prop="jizumj" label="计租面积" align="center" width="100"> </el-table-column>
                        <el-table-column fixed="right" label="操作" width="80" align="center">
                            <template slot-scope="scope">
                                <router-link :to="{ name: 'detaillz', params: { id: scope.row.id } }">
                                    <el-button type="text" size="small">查看</el-button>
                                </router-link>
                            </template>
                        </el-table-column>
                    </el-table>
                    <div class="pagination" style="float: right">
                        <el-pagination
                            background
                            layout="total,prev, pager, next,jumper"
                            :total="bzxzlzftotal"
                            :current-page.sync="bzxzlzfcurrent"
                            :page-size="pageSize"
                            @current-change="(val) => handleCurrentChange('bzxzlzfform', val)"
                        >
                        </el-pagination>
                    </div>
                </el-tab-pane>
            </el-tabs>
        </div>
    </div>
</template>

<script>
import {
    getfgyList,
    projectList,
    projectdelete,
    czjylist,
    jygllist,
    wtyylist,
    exportjygllist,
    exportwtyylist,
    exportczjylist,
    wtdwlist,
    wtyylisthj,
    czjylisthj,
    jygllisthj,
    buildlist,
    exportBuildlist,
    buildlisthj
} from '@/api/index';
import valueList from '@/components/common/valueList.vue';
export default {
    name: 'dalist',
    data() {
        return {
            getfgyShow: false, //房管员判断
            fmjzjbshow: true,
            wwbhjbshow: true,
            fmjzjbshow1: true,
            wwbhjbshow1: true,
            fmjzjbshow2: true,
            wwbhjbshow2: true,
            fmjzjbshow3: true,
            wwbhjbshow3: true,
            cblist: valueList.cblist,
            qslist: valueList.qslist, //区属
            cqdwlist: valueList.cqdwlist, //产权单位
            ztlist: valueList.jyztlist, //状态
            fwytlist: valueList.fwytlist, //房屋性质
            sflist: valueList.sflist, //是否列表
            fmjzjblist: valueList.fmjzjblist, //风貌建筑级别
            wwbhjblist: valueList.wwbhjblist, //文物保护级别
            fcztlist: valueList.fcztlist, //房产状态
            activeName: 'first',
            total: 0,
            current: 1,
            wtjytotal: 0,
            wtjycurrent: 1,
            czjytotal: 0,
            czjycurrent: 1,
            bzxzlzftotal: 0,
            bzxzlzfcurrent: 1,
            pageSize: 10,
            stdwlist: [],
            form: {
                cb: '',
                cqdw: '',
                create_name: '',
                create_name_id: '',
                create_time: '',
                current: 1,
                dabh: '',
                fwdz: '',
                glfs: '办公自用',
                id: '',
                jyglid: '',
                jzmj: '',
                pageSize: 10,
                qs: '',
                status_code: 0,
                // type: this.$store.getters.gfdw == '房产经理部' ? '1' : '2', //1房间 2楼
                type: '2',
                update_name: '',
                update_name_id: '',
                update_time: '',
                jzmja: '',
                jzmjb: ''
            },
            wtjyform: {
                cb: '', //产别 ,
                cqdw: '', //产权单位 ,
                create_time: '', //创建时间 ,
                current: 1, //第几页 ,
                dabh: '', //档案编号 ,
                fwdz: '', //地址 ,
                id: '', //id ,
                jyzt: '', //经营状态 0：招租中 1：出租 ,
                jzmj: '', //建筑面积 ,
                pageSize: 10, //每页数量 ,
                qs: '', //区属 ,
                type: '2',
                stdwmc: '' //受托单位

                // jzmjhj:'',//建筑面积合计
            },
            czjyform: {
                cb: '', //产别 ,
                cqdw: '', //产权单位 ,
                create_time: '', //创建时间 ,
                current: 1, //第几页 ,
                dabh: '', //档案编号 ,
                fwdz: '', //地址 ,
                id: '', //id ,
                jyzt: '', //经营状态 0：招租中 1：出租 ,
                jzmj: '', //建筑面积 ,
                pageSize: 10, //每页数量 ,
                qs: '', //区属 ,
                stdwmc: '', //受托单位
                type: '2',
                fgy: '',
                jzmja: '',
                jzmjb: ''
            },
            bzxzlzfform: {
                bzzf: '1', //是否保障性住房 1：是 0：否
                cb: '',
                cqdw: '',
                create_name: '',
                create_name_id: '',
                create_time: '',
                current: 0,
                dabh: '',
                dscs: '',
                dxcs: '',
                fmjz: '',
                fmjzjb: '',
                wwbh: '',
                wwbhjb: '',
                fwdz: '',
                fwjg: '',
                fwyt: '',
                fzrq: '',
                id: '',
                jdrq: '',
                jzmj: '',
                jzmja: '',
                jzmjb: '',
                jznd: '',
                jzxs: '',
                note: '',
                pageSize: 10,
                qs: '',
                qzlx: '',
                status_code: 0,
                tdsyqlx: '',
                tdsyqmj: '',
                update_name: '',
                update_name_id: '',
                update_time: '',
                yz: '',
                zlc: '',
                zsbh: '',
                zsxyl: '',
                type: '2',
                fczt: '1'
            },
            tableData: [],
            czjytableData: [],
            wtjytableData: [],
            bzxzlzftableData: [],
            fgylist: [], //房管员列表
            stdwform: {
                create_time: '', //创建时间 ,
                current: 1, //第几页 ,
                dwbh: '', //单位编号 ,
                dwmc: '', //单位名称 ,
                id: '', //id ,
                lxdh: '', // 联系电话 ,
                lxr: '', //联系人 ,
                pageSize: 1000, //每页数量 ,
                status_code: 1, //1正常 2删除
                tght: '', //托管合同 ,
                type: '2',
                yyzz: '' //营业执照
            },
            maxHeight: null,
            hjje: {},
            bgzyhjje: {},
            czjyhjje: {},
            type: this.$store.getters.type,
            role: this.$store.getters.role
        };
    },
    components: {},
    computed: {
        // 判断变色
        getcolorred(zt) {
            console.log(zt);
            return (zt) => {
                if (zt == '已出租') {
                    return { color: '#19BE6B', fontWeight: 700 };
                } else {
                    return { color: '#409ee1', fontWeight: 700 };
                }
            };
        }
    },
    methods: {
        // 列表样式
        tableHeaderColor({ row, column, rowIndex, columnIndex }) {
            if (rowIndex === 0) {
                return 'background:linear-gradient(to bottom, #008A94,#0ae2f2)!important;color:#ffffff;font-size:14px;';
            }
        },
        tablerowColor({ row, rowIndex }) {
            return 'height: 42px;font-size:14px;color:black';
        },
        tablecellColor() {
            return 'font-weight:700;color:#000000;border-color:#c0c0c0';
        },
        tableRowClassName({ row, rowIndex }) {
            if (rowIndex % 2 != 0) {
                return 'success-row'; //这是类名
            } else {
                return '';
            }
        },
        // 换页
        handleCurrentChange(myParam, val) {
            if (myParam == 'form') {
                this.current = val;
                this.form.current = val;
                this.jygllist(this.form);
            } else if (myParam == 'wtjyform') {
                this.wtjycurrent = val;
                this.wtjyform.current = val;
                this.wtyylist(this.wtjyform);
            } else if (myParam == 'czjyform') {
                this.czjycurrent = val;
                this.czjyform.current = val;
                this.czjylist(this.czjyform);
            } else if (myParam == 'bzxzlzfform') {
                this.bzxzlzfcurrent = val;
                this.bzxzlzfform.current = val;
                this.buildlist(this.bzxzlzfform);
            }
            console.log(val);
        },
        // 搜索
        onSearch(myParam) {
            if (myParam == 'form') {
                this.current = 1;
                this.form.current = 1;
                this.jygllist(this.form);
                this.jygllisthj(this.form);
            } else if (myParam == 'wtjyform') {
                this.wtjycurrent = 1;
                this.wtjyform.current = 1;
                this.wtyylist(this.wtjyform);
                this.wtyylisthj(this.wtjyform);
            } else if (myParam == 'czjyform') {
                this.czjycurrent = 1;
                this.czjyform.current = 1;
                this.czjylist(this.czjyform);
                this.czjylisthj(this.czjyform);
            } else if (myParam == 'bzxzlzfform') {
                this.bzxzlzfcurrent = 1;
                this.bzxzlzfform.current = 1;
                this.buildlist(this.bzxzlzfform);
                this.buildlisthj(this.bzxzlzfform);
            }
        },
        onSearch1(myParam, name, value) {
            console.log(value);
            if (myParam == 'form') {
                if (name == 'fmjz') {
                    console.log('fmjz', value);
                    this.form.fmjzjb = '';
                    this.fmjzjbshow = value == '是' ? false : true;
                } else if (name == 'wwbh') {
                    console.log('wwbh', value);
                    this.form.wwbhjb = '';
                    this.wwbhjbshow = value == '是' ? false : true;
                }
                this.current = 1;
                this.form.current = 1;
                this.jygllist(this.form);
                this.jygllisthj(this.form);
            } else if (myParam == 'wtjyform') {
                if (name == 'fmjz') {
                    console.log('fmjz', value);
                    this.wtjyform.fmjzjb = '';
                    this.fmjzjbshow1 = value == '是' ? false : true;
                } else if (name == 'wwbh') {
                    console.log('wwbh', value);
                    this.wtjyform.wwbhjb = '';
                    this.wwbhjbshow1 = value == '是' ? false : true;
                }
                this.wtjycurrent = 1;
                this.wtjyform.current = 1;
                this.wtyylist(this.wtjyform);
                this.wtyylisthj(this.wtjyform);
            } else if (myParam == 'czjyform') {
                if (name == 'fmjz') {
                    console.log('fmjz', value);
                    this.czjyform.fmjzjb = '';
                    this.fmjzjbshow2 = value == '是' ? false : true;
                } else if (name == 'wwbh') {
                    console.log('wwbh', value);
                    this.czjyform.wwbhjb = '';
                    this.wwbhjbshow2 = value == '是' ? false : true;
                }
                this.czjycurrent = 1;
                this.czjyform.current = 1;
                this.czjylist(this.czjyform);
                this.czjylisthj(this.czjyform);
            } else if (myParam == 'bzxzlzfform') {
                if (name == 'fmjz') {
                    console.log('fmjz', value);
                    this.bzxzlzfform.fmjzjb = '';
                    this.fmjzjbshow3 = value == '是' ? false : true;
                } else if (name == 'wwbh') {
                    console.log('wwbh', value);
                    this.bzxzlzfform.wwbhjb = '';
                    this.wwbhjbshow3 = value == '是' ? false : true;
                }
                this.bzxzlzfcurrent = 1;
                this.bzxzlzfform.current = 1;
                this.buildlist(this.bzxzlzfform);
                this.buildlisthj(this.bzxzlzfform);
            }
        },
        // 重置
        reSearch(myParam) {
            if (myParam == 'form') {
                this.fmjzjbshow = true;
                this.wwbhjbshow = true;
                this.current = 1;
                this.form = {
                    cb: '',
                    cqdw: '',
                    create_name: '',
                    create_name_id: '',
                    create_time: '',
                    current: 1,
                    dabh: '',
                    fwdz: '',
                    glfs: '办公自用',
                    id: '',
                    jyglid: '',
                    jzmj: '',
                    pageSize: 10,
                    qs: '',
                    status_code: 0,
                    // type: this.$store.getters.gfdw == '房产经理部' ? '1' : '2', //1房间 2楼
                    update_name: '',
                    update_name_id: '',
                    update_time: '',
                    fmjz: '',
                    fmjzjb: '',
                    wwbh: '',
                    type: '2',
                    wwbhjb: '',
                    jzmja: '',
                    jzmjb: ''
                };
                this.jygllist(this.form);
                this.jygllisthj(this.form);
            } else if (myParam == 'wtjyform') {
                this.fmjzjbshow1 = true;
                this.wwbhjbshow1 = true;
                this.wtjycurrent = 1;
                this.wtjyform = {
                    cb: '', //产别 ,
                    cqdw: '', //产权单位 ,
                    create_time: '', //创建时间 ,
                    current: 1, //第几页 ,
                    dabh: '', //档案编号 ,
                    fwdz: '', //地址 ,
                    id: '', //id ,
                    jyzt: '', //经营状态 0：招租中 1：出租 ,
                    jzmj: '', //建筑面积 ,
                    fwyt: '', //房屋性质
                    pageSize: 10, //每页数量 ,
                    qs: '', //区属 ,
                    stdwmc: '', //受托单位
                    fmjz: '',
                    fmjzjb: '',
                    wwbh: '',
                    type: '2',
                    wwbhjb: ''
                    // jzmjhj:'',//建筑面积合计
                };
                this.wtyylist(this.wtjyform);
                this.wtyylisthj(this.wtjyform);
            } else if (myParam == 'czjyform') {
                this.fmjzjbshow2 = true;
                this.wwbhjbshow2 = true;
                this.czjycurrent = 1;
                this.czjyform = {
                    cb: '', //产别 ,
                    cqdw: '', //产权单位 ,
                    create_time: '', //创建时间 ,
                    current: 1, //第几页 ,
                    dabh: '', //档案编号 ,
                    fwdz: '', //地址 ,
                    id: '', //id ,
                    jyzt: null, //经营状态 0：招租中 1：出租 ,
                    jzmj: '', //建筑面积 ,
                    pageSize: 10, //每页数量 ,
                    qs: '', //区属 ,
                    stdwmc: '', //受托单位
                    fmjz: '',
                    fmjzjb: '',
                    wwbh: '',
                    wwbhjb: '',
                    type: '2',
                    fgy: this.$store.getters.role == '10011' ? this.$store.getters.userId : '',
                    jzmja: '',
                    jzmjb: ''
                };
                this.czjylist(this.czjyform);
                this.czjylisthj(this.czjyform);
            } else if (myParam == 'bzxzlzfform') {
                this.fmjzjbshow3 = true;
                this.wwbhjbshow3 = true;
                this.bzxzlzfcurrent = 1;
                this.bzxzlzfform = {
                    bzzf: '1', //是否保障性住房 1：是 0：否
                    cb: '',
                    cqdw: '',
                    create_name: '',
                    create_name_id: '',
                    create_time: '',
                    current: 1,
                    dabh: '',
                    dscs: '',
                    dxcs: '',
                    fmjz: '',
                    fmjzjb: '',
                    wwbh: '',
                    wwbhjb: '',
                    fwdz: '',
                    fwjg: '',
                    fwyt: '',
                    fzrq: '',
                    id: '',
                    jdrq: '',
                    jzmj: '',
                    jzmja: '',
                    jzmjb: '',
                    jznd: '',
                    jzxs: '',
                    note: '',
                    pageSize: 10,
                    qs: '',
                    qzlx: '',
                    status_code: 0,
                    tdsyqlx: '',
                    tdsyqmj: '',
                    update_name: '',
                    update_name_id: '',
                    update_time: '',
                    yz: '',
                    zlc: '',
                    zsbh: '',
                    zsxyl: '',
                    type: '2',
                    fczt: '1'
                };
                this.buildlist(this.bzxzlzfform);
                this.buildlisthj(this.bzxzlzfform);
            }
        },
        // 删除
        deleteClick(e) {
            console.log(e);
            this.$confirm('确定删除此条信息吗？')
                .then(() => {
                    let data = { id: e.id };
                    projectdelete(data).then((res) => {
                        if (res.code == 200) {
                            this.projectList(this.form);
                            this.$message.success('删除成功');
                        }
                    });
                })
                .catch(() => {
                    this.$message.success('删除取消');
                });
        },
        // 出租经营列表
        czjylist(data) {
            czjylist(data).then((res) => {
                if (res.code == 200) {
                    this.czjytableData = res.data.records;
                    this.czjytotal = res.data.total;
                } else {
                    this.czjytableData = [];
                    this.czjytotal = 0;
                }
            });
        },
        // 办公自用列表
        jygllist(data) {
            jygllist(data).then((res) => {
                // console.log('res',res)
                if (res.code == 200) {
                    this.tableData = res.data.records;
                    this.total = res.data.total;
                } else {
                    this.tableData = [];
                    this.total = 0;
                }
            });
        },
        // 委托运营
        wtyylist(data) {
            wtyylist(data).then((res) => {
                // console.log('res',res)
                if (res.code == 200) {
                    this.wtjytableData = res.data.records;
                    this.wtjytotal = res.data.total;
                } else {
                    this.wtjytableData = [];
                    this.wtjytotal = 0;
                }
            });
        },
        // 导出
        downloadlist(val) {
            console.log(val);
            // 办公自用
            if (val == 'form') {
                exportjygllist(this.form).then((res) => {
                    console.log(res);
                    const link = document.createElement('a');
                    let blob = new Blob([res], {
                        type: 'application/vnd.ms-excel'
                    });
                    link.style.display = 'none';
                    //设置连接
                    link.href = URL.createObjectURL(blob);
                    link.download = '办公自用导出文件';
                    document.body.appendChild(link);
                    //模拟点击事件
                    link.click();
                    console.log(res);
                });
            } else if (val == 'wtjyform') {
                exportwtyylist(this.wtjyform).then((res) => {
                    console.log(res);
                    const link = document.createElement('a');
                    let blob = new Blob([res], {
                        type: 'application/vnd.ms-excel'
                    });
                    link.style.display = 'none';
                    //设置连接
                    link.href = URL.createObjectURL(blob);
                    link.download = '委托运营导出文件';
                    document.body.appendChild(link);
                    //模拟点击事件
                    link.click();
                    console.log(res);
                });
            } else if (val == 'czjyform') {
                exportczjylist(this.czjyform).then((res) => {
                    console.log(res);
                    const link = document.createElement('a');
                    let blob = new Blob([res], {
                        type: 'application/vnd.ms-excel'
                    });
                    link.style.display = 'none';
                    //设置连接
                    link.href = URL.createObjectURL(blob);
                    link.download = '出租经营导出文件';
                    document.body.appendChild(link);
                    //模拟点击事件
                    link.click();
                    console.log(res);
                });
            } else {
                exportBuildlist(this.bzxzlzfform).then((res) => {
                    console.log(res);
                    const link = document.createElement('a');
                    let blob = new Blob([res], {
                        type: 'application/vnd.ms-excel'
                    });
                    link.style.display = 'none';
                    //设置连接
                    link.href = URL.createObjectURL(blob);
                    link.download = '楼幢导出文件';
                    document.body.appendChild(link);
                    //模拟点击事件
                    link.click();
                    console.log(res);
                });
            }
        },
        // 受托单位列表
        wtdwlist(data) {
            wtdwlist(data).then((res) => {
                if (res.code == 200) {
                    this.stdwlist = res.data.records;
                } else {
                    this.stdwlist = [];
                }
            });
        },
        // 项目列表
        buildlist(data) {
            buildlist(data).then((res) => {
                if (res.code == 200) {
                    console.log(this.$store.getters.role);
                    console.log(this.$store.getters.yzydbnum);
                    console.log(this.$store.getters.dbnum3);
                    this.bzxzlzftableData = res.data.records;
                    this.bzxzlzftotal = res.data.total;
                    this.maxHeight = window.innerHeight - 440;
                } else {
                    this.bzxzlzftableData = [];
                    this.total = 0;
                }
            });
        },
        // 项目合计
        buildlisthj(data) {
            buildlisthj(data).then((res) => {
                if (res.code == 200) {
                    this.hjje = res.data;
                    console.log(res.data);
                } else {
                    this.$message.error = '请联系管理人员！！';
                }
            });
        },
        // 项目合计
        wtyylisthj(data) {
            wtyylisthj(data).then((res) => {
                if (res.code == 200) {
                    this.hjje = res.data;
                    console.log(res.data);
                } else {
                    this.$message.error = '请联系管理人员！！';
                }
            });
        },
        // 办公自用项目合计
        jygllisthj(data) {
            jygllisthj(data).then((res) => {
                if (res.code == 200) {
                    this.bgzyhjje = res.data;
                    console.log(res.data);
                } else {
                    this.$message.error = '请联系管理人员！！';
                }
            });
        },
        // 出租经验项目合计
        czjylisthj(data) {
            czjylisthj(data).then((res) => {
                if (res.code == 200) {
                    this.czjyhjje = res.data;
                    console.log(res.data);
                } else {
                    this.$message.error = '请联系管理人员！！';
                }
            });
        },
        // 获取房管员列表
        getfgyList() {
            let data = {};
            getfgyList(data).then((res) => {
                if (res.code == 200) {
                    this.fgylist = res.data;
                    if (this.$store.getters.role == '10011') {
                        console.log(this.$store.getters.userId);
                        this.czjyform.fgy = this.$store.getters.userId;
                        this.getfgyShow = true;
                    } else {
                        this.getfgyShow = false;
                    }
                    this.czjylist(this.czjyform);
                    this.czjylisthj(this.czjyform);
                    console.log(res.data);
                } else {
                    this.$message.error = '获取数据失败！！';
                }
            });
        },
        // 合并计算某一列
        getSummaries(param) {
            const { columns, data } = param;
            const sums = [];
            columns.forEach((column, index) => {
                if (index === 0) {
                    sums[index] = '合计';
                    return;
                }
                // 只对amount这一列进行总计核算。
                if (column.property === 'jzmj') {
                    sums[index] = this.hjje.jzmj;
                } else {
                    sums[index] = '---';
                }
            });
            return sums;
        },
        // 合计办公自用
        getSummariesbgzy(param) {
            const { columns, data } = param;
            const sums = [];
            columns.forEach((column, index) => {
                if (index === 0) {
                    sums[index] = '合计';
                    return;
                }
                // 只对amount这一列进行总计核算。
                if (column.property === 'jzmj') {
                    sums[index] = this.bgzyhjje.jzmj;
                } else {
                    sums[index] = '---';
                }
            });
            return sums;
        },
        // 合计出租经验
        getSummariesczjy(param) {
            const { columns, data } = param;
            const sums = [];
            columns.forEach((column, index) => {
                if (index === 0) {
                    sums[index] = '合计';
                    return;
                }
                // 只对amount这一列进行总计核算。
                if (column.property === 'jzmj') {
                    sums[index] = this.czjyhjje.jzmj;
                } else {
                    sums[index] = '---';
                }
            });
            return sums;
        },
        // 跳转数据归档编辑页面
        gotosjymedit(type, id, fgy, fwdz, dabh) {
            this.$router.push({
                name: 'czjyvalgly',
                params: { id: id, type: type, fgy: fgy, fwdz: fwdz, dabh: dabh }
            });
        }
    },
    mounted() {
        this.$nextTick(() => {
            // window.innerHeight 浏览器窗口的可见高度，下面的 420 是除了table最大高度的剩余空间。
            this.maxHeight = window.innerHeight - 460;
        });
        // 获取房管员列表
        this.getfgyList();
        // this.projectList(this.form);
        this.wtyylist(this.wtjyform);
        this.wtyylisthj(this.wtjyform);

        this.jygllist(this.form);
        this.jygllisthj(this.form);
        this.wtdwlist(this.stdwform);
        this.buildlist(this.bzxzlzfform);
        this.buildlisthj(this.bzxzlzfform);
    }
};
</script>
<style>
/* .el-table { overflow: visible !important; } */
.el-table__footer-wrapper tbody td.el-table__cell {
    font-weight: 600;
    background: rgb(246, 238, 217);
}

.tablestyle > .el-table {
    overflow: auto;
}

.tablestyle > .el-table .el-table__body-wrapper,
.tablestyle > .el-table .el-table__header-wrapper,
.tablestyle > .el-table .el-table__footer-wrapper {
    overflow: visible;
}

.tablestyle > .el-table::after {
    position: relative !important;
}
</style>
<style scoped>
.container {
    /* height: calc(100vh - 260px); */
    overflow: hidden;
}

.crumbs {
    background-color: #fff;
    padding: 20px 20px;
}

.indexTitle {
    margin-bottom: 20px;
}

.contentsize {
    font-size: 18px;
    font-weight: 700;
}

.handle-box {
    overflow: hidden;
}

/* 新增按钮 */
.addcolor {
    margin-bottom: 10px;
}
</style>
<style>
.success-row {
    background-color: #eaf3fb !important;
}
</style>
